import request from '@/utils/request'

// 获取售后信息列表
export function getShouhouInfoList(queryParams) {
  return request({
    url: `/Empment/shouhou/maintain/list`,
    method: 'get',
    params: queryParams
  });
}

// 更新七天失效情况
export function loadList(queryParams) {
  return request({
    url: `/Empment/shouhou/maintain/loadList`,
    method: 'put',
    params: queryParams
  });
}

// 插入物流信息
export function addShouhouWuliu(data){
  return request({
    url: `/Empment/shouhou/maintain/wuliu/insert`,
    method: 'post',
    data: data
  });
}

// 删除信息表中的商品
export function shouhouSend(snId) {
  return request({
    url: `/Empment/shouhou/maintain/delete/${snId}`,
    method: 'delete'
  });
}


// 新增商品
export function addShouhouInfo(data) {
  return request({
    url: `/Empment/shouhou/maintain/insert`,
    method: 'post',
    data: data
  });
}


// 修改数据信息
export function updateShouhou(data) {
  return request({
    url: `/Empment/shouhou/maintain/update`,
    method: 'put',
    data: data
  });
}


// 维修操作
export function shouhouWeixiu(data) {
  return request({
    url: `/Empment/shouhou/maintain/weixiu`,
    method: 'post',
    data: data
  });
}

// 配件信息查询
export function partsQuery(snId){
  return request({
    url:`/Empment/shouhou/maintain/partsQuery/${snId}`,
    method:'get'
  })
}

// 新增配件
export function partsAdd(data){
  return request({
    url:`/Empment/shouhou/maintain/partsAdd`,
    method:'post',
    data:data
  })
}

// 删除数据
export function partsDelete(id){
  return request({
    url:`/Empment/shouhou/maintain/partsDelete/${id}`,
    method:'delete'
  })
}
